#!/usr/bin/env python

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()


f.add(from_re= 'The MM/MM classical interaction energy',
      num_lines = 11,
      rel_tolerance = 1.0e-8)

f.add(from_re= 'Final output from CC2/MM energy program',
      num_lines = 11,
      rel_tolerance = 1.0e-8)

f.add(from_re= 'Unrelaxed  CC2    First-order one-electron properties:',
      num_lines = 60,
      rel_tolerance = 1.0e-6)

test.run(['cc2mm_spc_fop.dal'], ['cc2mm_spc_fop.mol'], ['cc2mm_spc_fop.pot'], f={'out': f},
         accepted_errors=['not implemented for parallel calculations.'])

sys.exit(test.return_code)
